﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Test_ProDivingAdmin2salmon14
{
    public partial class Form1 : Form
    {
        public int dummyCount;
        public int dummyInt;
        private Contest c;

        public Form1()
        {
            c = new Contest(true, 18, 10,7);
            InitializeComponent();
            Button sendDive = new Button();
            Button getJudge = new Button();

            getJudge.Parent = this;
            getJudge.Location = new Point(100, 100);
            getJudge.Click += new EventHandler(OnNewJudge);
            sendDive.Parent = this;
            sendDive.Size = new System.Drawing.Size(60, 60);
            sendDive.Click += new EventHandler(OnSendDive);
            sendDive.Text = "Send new Dive";
            dummyCount = 0;
            dummyInt = 0;
        }

        public void OnNewJudge(object sender, EventArgs e) 
        {
            MessageBox.Show(Contest.judgeList[dummyInt].ID.ToString());
            dummyInt++;
        }

        public void OnSendDive(object sender, EventArgs e) 
        {
            CommunicationServer.sendText = "!Dive" + dummyCount;
            dummyCount++;
            CommunicationServer.SendDive();
        }
    }
}
